﻿<Window x:Class="Pvp.App.View.EnterKeyWindow"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:res="clr-namespace:Pvp.App.Resources"
        xmlns:app="clr-namespace:Pvp.App"
        xmlns:i="clr-namespace:System.Windows.Interactivity;assembly=System.Windows.Interactivity"
        xmlns:cmd="clr-namespace:GalaSoft.MvvmLight.Command;assembly=GalaSoft.MvvmLight.Extras.WPF4"
        Title="EnterKeyWindow" Height="150" Width="400"
        WindowStyle="None"
        ResizeMode="NoResize"
        DataContext="{x:Static app:ViewModelLocator.EnterKeyViewModel}">
    <StackPanel Margin="10">
        <TextBlock Text="{x:Static res:Resources.enter_key_message}" HorizontalAlignment="Center" Margin="10" />
        <TextBlock Text="{Binding SelectedKeyCombination, Mode=OneWay}" HorizontalAlignment="Center" Margin="10" />
        <Button IsDefault="True" Command="{Binding OkCommand}" Content="{x:Static res:Resources.ok}" HorizontalAlignment="Center" 
                Margin="10" Padding="20,5,20,5" />
    </StackPanel>
    
    <i:Interaction.Triggers>
        <i:EventTrigger EventName="KeyDown">
            <cmd:EventToCommand Command="{Binding KeyDownCommand}" PassEventArgsToCommand="True" />
        </i:EventTrigger>
    </i:Interaction.Triggers>
</Window>
